#pragma once

#ifdef __OBJC__
	#import <Foundation/Foundation.h>
#endif

//platform.... iphone test
#if __APPLE__
	//apple check
	#import <Availability.h>
	#if __IPHONE_2_0
	#define _IPHONE_ 1
	#endif
#else
	#define _IPHONE_ 0
#endif

//platform... android
#ifdef __ANDROID__
#define _ANDROID_ 1
#else
	#define	_ANDROID_ 0
#endif

#if (defined _WIN32) || (defined _W64)
	#define _WIN_ 1
#else
	#define _WIN_ 0
#endif

#if 0
#error "not support other platform"
#endif

#define FMT_TO_STRING(fmt, ...)	\
const int bufsize = 1024 * 64;	\
char buffer[bufsize];	\
va_list argptr;	\
int ret;	\
va_start(argptr, fmt);	\
ret = vsprintf(buffer, fmt, argptr);	\
va_end(argptr);	\
std::string msg(buffer);

